#ifndef AZROOTRECORD_H
#define AZROOTRECORD_H

#include "AzRecord.h"

#include "AzField.h"


class AZLIB_EXPORT AzRootRecord :public QObject, public AzRecord  {
Q_OBJECT
public:
    AzRootRecord(QObject*  = 0);
    AzRootRecord(const AzRootRecord& );
    ~AzRootRecord();

    inline const AzFieldList& fields() const           { return mFields; }
    inline AzFieldList& fields()                       { return mFields; }
    inline const AzField &field(int i) const           { return mFields[i];}

    int size() const                                   { return mFields.size(); } //проверить, нужно ли

    inline void setLogChanged(bool val)                 { mLogChanges = val; }
    inline bool logChanged() const                      { return mLogChanges; }

    AzRootRecord& operator = (const AzRootRecord&);

protected:
private slots:
    void fieldChanged(AzFieldList::FieldChangedSignalType, int);
private:
    void copy(const AzRootRecord&);
    AzFieldList mFields;
    bool mLogChanges;
};

#endif // AZROOTRECORD_H
